package j02yinyong;

class A{
    public static void fx(){
        System.out.println(111);
    }
    public static void fy(int a){
        System.out.println("a="+a);
    }
}

interface I1{
    void f1();
}

interface I2{
    void f2(int num);
}

public class J1 {
    public static void main(String[] args) {
//        I1 i1 = ()->{
//            System.out.println(888);
//        };

        I1 i1 = A::fx;
        i1.f1();
        System.out.println("=======");
        I2 i2 = A::fy;
        i2.f2(7777);
    }
}

//非静态
class Cat{
    void say(){
        System.out.println("喵！");
    }
}
interface Iabc{
    void ff();
}

class CatTest{
    public static void main(String[] args) {
        Cat cat = new Cat();
        Iabc iabc = cat::say;
        iabc.ff();
    }
}